import Vue from 'vue';
import Router from 'vue-router';
// import VueRouter from 'vue-router';
import { routes } from '@/mocks/router';
import store from '@/store';

// class Router extends VueRouter {
//   public isBack: boolean = false;
// }
Vue.use(Router);
Router.prototype.back = () => {
  // this.isBack = true;
  store.commit('SET_ISBACK', true);
  window.history.go(-1);
};
export default new Router({
  routes,
});
